package com.samshow.res.repository;

import com.samshow.res.entity.TEquipProgramEntity;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import java.util.List;

/**
 * Created by niwb on 2017/3/24.
 */
public interface TEquipProgramRepository extends CrudRepository<TEquipProgramEntity, Integer> {

    /**
     * 去除节目设备关系
     * @param netId
     * @param pId
     */
    @Query(value = "DELETE FROM t_equip_program WHERE C_EQUIP_ID=1? AND C_NAME in 2?",nativeQuery = true)
    @Modifying
    public void deletByEidAndName(String netId,List<String> names);
}
